<h1>Quick URL shortening</h1>
<form action="" method="post">
	<div class="longer-form-field">
		<label>Long URL to make tiny:</label>
		<input type="text" name="longurl" value="{$longurl|escape}" /> (required)
	</div>
	<div class="longer-form-field">
		<label>Custom keyword:</label>
		<input type="text" name="keyword" value="{$keyword|escape}" /> (optional)
	</div>
	<div class="longer-form-field">
		<label>Your email: (<a href="/help.php#quick_create">?</a>)</label>
		<input type="text" name="email" value="{$email|escape}" /> (required)
		<br /><br />
	</div>
	<div class="longer-form-field">
		<label>URL options:</label>
		<div class="float">
			Password protection: <input type="text" name="password" value="{$password|escape}" /><br />
			<input type="checkbox" name="cloak" value="1" class="no-border" {if $cloak}checked="checked" {/if}/> Cloak using a frame<br />
			<span class="cb-indent">Title: <input type="text" name="title" value="{$title|escape}" /></span>
		</div>
		<div class="clear"></div>
	</div>
	<div class="longer-form-field">
		<label>&nbsp;</label>
		<input type="submit" name="shorten_button" value="Shorten" />
	</div>
</form>
<h1>Widget</h1>
<div class="longer-form-field">
	<label>Paste this code in your website template:</label>
	{capture name="widget"}<!-- BEGIN {#RewriteHost#|upper} CODE -->
<form id="shorten" action="{get_scheme()}://{#WWWHost#}/shorten.php" method="post" target="_blank"><table style="border: 1px solid #000000; border-collapse: collapse;"><tr><td colspan="2" style="background-color: #000000; color: #ffffff; text-align: center; font-weight: bold;">{#RewriteHost#|upper}</td></tr><tr><td style="width: 100px;">Long URL:</td><td><input type="text" name="longurl" value="" /></td></tr><tr><td>Your email: (<a href="{get_scheme()}://{#WWWHost#}/help.php#quick_create" target="_blank">?</a>)</td><td><input type="text" name="email" value="" /></td></tr><tr><td><a href="{get_scheme()}://{#WWWHost#}/shorten.php" target="_blank">More options</a></td><td><input type="submit" name="shorten_button" value="Shorten" /></td></tr></table></form>
<!-- END {#RewriteHost#|upper} CODE -->{/capture}
	<textarea rows="5" cols="35" onclick="this.focus(); this.select();">{$smarty.capture.widget|escape:'htmlall'}</textarea>
	<br /><br />
</div>
<div class="longer-form-field widget">
	<label>Preview:</label>
	{$smarty.capture.widget}
</div>
